package com.itheima.blockingqueue;

import java.util.concurrent.ArrayBlockingQueue;

public class Demo_BlockingQueue {
    public static void main(String[] args) {
        //创建阻塞队列
        ArrayBlockingQueue<String> list = new ArrayBlockingQueue<>(1);

        //创建线程开启
        Producer p = new Producer(list);
        Consumer c = new Consumer(list);

        //开启线程
        p.start();
        c.start();
    }
}
